<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>监理服务系统</title>

    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--extended-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${re.contextPath}/pageoffice.js" id="po_js_main"></script>
</head>
    <style>
      .layui-tab-title{
          overflow-x: auto !important;
          overflow-y: hidden !important;
          height:auto!important;
      }
    </style>

<body>
<!--容器-->
<div class="container clearfix">
    <div class="projectDetail">
        <#--        <ul class="clearfix ft20">-->
        <#--            <li class="whitebg blue">项目一</li>-->
        <#--            <li>项目二</li>-->
        <#--        </ul>-->
        <div class="projectDetailMain whitebg clearfix">
            <div class="projectDetailMainLf fl">
                <div class="ft18 bold">项目信息</div>
                <ul class="projectDetailUl clearfix">
                    <li>
                        <input type="hidden" name="id" id="id" value="${project.id}">
                        <div><label class="gary">项目名称：</label>${project.projectName}</div>
                        <div><label class="gary">项目类型：</label>${project.projectTypeName}</div>
                        <div><label class="gary">项目来源：</label>${project.projectSourceName}</div>
                        <div style="word-break:break-all;"><label class="gary">合同编号：</label>${project.contractNo}</div>
                        <div><label class="gary">监理合同名称：</label>${project.jlHtName}</div>
                    </li>
                    <li>
                        <div><label class="gary">总工期：</label>${project.totalDurationBeginDate}
                            至 ${project.totalDurationEndDate} </div>
                        <div><label class="gary">投资额：</label>${project.tzMoney}元</div>
                        <div><label class="gary">监理形式：</label>${project.checkShapeName}</div>
                        <div style="word-break:break-all;"><label class="gary">采购/项目编号：</label>${project.payOrProjectNo}</div>
                        <div>
                            <label class="gary">实施地点：</label>
                            <#list listpalce as vo>
                                <div>${vo.provinceName} ${vo.cityName} ${vo.countyName}</div>
                            </#list>

                        </div>
                    </li>
                    <li>
                        <div>
                            <label class="gary">合同签订地点：</label>${project.provinceName} ${project.cityName} ${project.countyName}
                        </div>
                        <div><label class="gary">项目归属：</label>${project.projectOwnerName}</div>
                        <div><label class="gary">行业类型：</label>${project.hyTypeName}</div>
                        <div><label class="gary">内部合同编号：</label>${project.insideContractNo}</div>
                        <div><label class="gary">是否续签：</label>${project.isContinueName}</div>
                    </li>
                </ul>
                <div class="ft18 ">监理单位：${project.supervisorCompanyName}</div>
                <ul class="projectDetailUl clearfix">
                    <li>

                        <div><label class="gary">项目经理：</label>${project.projectManagerPersonName}</div>
                        <div><label class="gary">监理合同额：</label>${project.htMoney}元</div>
                        <div><label class="gary">补充协议金额：</label>${project.bcxyMoney}元</div>
                    </li>
                    <li>
                        <div><label class="gary">总监理工程师：</label>${project.supervisorEngineerName}</div>
                        <div><label class="gary">监理已支付金额：</label><span id="jlzf">${project.jlPayMoney}</span>元</div>
                    </li>
                    <li>
                        <div><label class="gary">技术负责人：</label>${project.technologyPersonName}</div>
                        <div><label class="gary">监理工程师：</label>${project.secondSupervisorEngineerName}</div>
                    </li>
                </ul>
                <div class="projectDetailCont clearfix">
                    <div class="projectDetailContLf fl">
                        <div class="ft18 ">项目阶段</div>
                        <ul class="clearfix">
                            <#list listStage as vo>
                                <li>
                                    <#if "${vo.stageNo}"!="005" >
                                        <span>${vo.orderNum}</span>
                                        <span class="ml10 ft14">${vo.stageName}</span>
                                        <span class="ml10 ft12 gary">${vo.startTime} 至 ${vo.endTime}</span>
                                    </#if>
                                </li>
                            </#list>
                        </ul>
                    </div>
                    <div class="projectDetailContLf fl ml20">
                        <div class="ft18 ">监理费付款方式</div>
                        <ul class="clearfix">
                            <#list listpay as vo>
                                <li>
                                    <span>${vo.sppNo}</span>
                                    <span class="ml10 ft14 gary">第${vo.sppNo}次付款</span>
                                    <span class="ml10 ft12 ">${vo.milepostName}</span>
                                    <#if "${project.fkType}" == "1">
                                        <span class="ml10 ft12 ">${vo.sppPersent}</span>
                                    </#if>
                                    <#if "${project.fkType}" == "2">
                                        <span class="ml10 ft12 ">${vo.payDate}</span>
                                    </#if>
                                </li>
                            </#list>
                        </ul>
                    </div>
                    <div class="projectDetailContRt fr">
                        <div class="ft18">项目分包数：${project.fbNum}个</div>
                        <ul class="clearfix">
                            <#list listfb as vo>
                                <li><span class="gary">分包编号</span> <span>${vo.code}</span></li>
                            </#list>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="projectDetailMainRt fr">
                <div class="ft18 ">业主单位：${project.owerCompany}</div>
                <ul class="projectDetailMainRtOne" style="padding: 10px;font-size: 14px;height: 133px;">
                    <#list listyz as vo>
                        <li class="clearfix">
                            <div>
                                <div class="gary ">项目负责人</div>
                                <div>${vo.realName}</div>
                            </div>
                            <div>
                                <div class="gary">职务</div>
                                <div>${vo.duty}</div>
                            </div>
                            <div>
                                <div class="gary">分包编号</div>
                                <div>${vo.leaderFbNumber}</div>
                            </div>
                        </li>
                    </#list>
                </ul>
                <div class="ft18 ">承建单位列表</div>
                <ul class="projectDetailMainRtTwo" style="padding: 10px;font-size: 14px;height: 293px;">
                    <#list listcj as vo>
                        <li>
                            <div style="width: 42%;" >
                                <span class="gary bold">分包编号：</span> ${vo.constructionSubContractNumber}
                            </div>
                            <div style="width: 55%;" >
                                <div class="gary">承建合同名称：${vo.constructionContract}</div>
                            </div>
                        </li>
                        <li>
                            <div style="width: 42%;" >
                                <div class="gary" style="word-wrap: break-word;">合同编号：${vo.contractNo}</div>
                            </div>
                            <div style="width: 55%;" >
                                <div class="gary" style="word-wrap: break-word;">采购/项目编号：${vo.payOrProjectNo}</div>
                            </div>
                        </li>
                        <li class="clearfix" style="border-bottom: 1px  solid #cccccc;">
                            <div>
                                <div class="gary">承建单位</div>
                                <div class="">${vo.unitConstruction}</div>
                            </div>
                            <div>
                                <div class="gary">项目经理</div>
                                <div class="">${vo.realName}</div>
                            </div>
                            <div>
                                <div class="gary">合同金额</div>
                                <div class="">${vo.contractAmount}元</div>
                            </div>
                            <div>
                                <div class="gary">已支付金额</div>
                                <div class=""><span id="cjzf${vo.constructionSubContractNumber}">${vo.payMoney}</span>元</div>
                            </div>
                        </li>
                        <br/>
                    </#list>
                </ul>
                <div class="progressArticle whitebg clearfix" style=" height: 30px;line-height: 30px;">
                    <div class="fl" style="width: 20%;margin-right: 0px;">项目进度</div>
                    <div class="layui-progress layui-progress-big fl" lay-showpercent="true"
                         style="width: 50%;margin-left: 5px;margin-top: 11px;">
                        <div id="proprogress" class="layui-progress-bar" lay-percent="${project.progress}%"></div>
                    </div>
                </div>
                <div>
                    <@shiro.hasPermission name="file:statistics">
                                        <button type="button" class="layui-btn fl" style="width: 100px;height: 35px;padding:0;"
                                                onclick="_prom_page.events.wdTj(this)"> 文档统计
                                        </button>
                    </@shiro.hasPermission>
                     <@shiro.hasPermission name="file:events">
                                        <button type="button" class="layui-btn fl"
                                                style="width: 100px;height: 35px;padding:0;background: #FF4343;"
                                                onclick="_prom_page.events.bigEvent(this)">项目大事记
                                        </button>
                     </@shiro.hasPermission>
                     <@shiro.hasPermission name="file:exprotALl">
                                        <button type="button" class="layui-btn fl"
                                                style="width: 100px;height: 35px;padding:0;background: #5775EF;" onclick="exportall()">一键导出
                                        </button>
                     </@shiro.hasPermission>
                 </div>
            </div>
        </div>
    </div>
    <a name="abs" class="maodian"></a>
    <div class="Details clearfix">
        <!--左侧导航栏-->
        <div class="DetailsLf fl">
            <div class="DetailsLfBOx whitebg" id="divLeft">
                <#list listStage as vo>
                    <div class="blue bold ft18 clearfix">
                        <#if "${vo.finishStatus}"=="3">
                            <img src="${re.contextPath}/plugin/common/images/14@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="2">
                            <img src="${re.contextPath}/plugin/common/images/15@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="1">
                            <img src="${re.contextPath}/plugin/common/images/16@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        <#elseif  "${vo.finishStatus}"=="0">
                            <img src="${re.contextPath}/plugin/common/images/17@2x.png" id="jd${vo.id}" alt=""
                                 class="fl">
                        </#if>
                        <span class="fll" value="${vo.id}"
                              projectId="${vo.projectId}">${vo.stageName}</span>
                    </div>
                    <ul>
                        <#list listmilepost as vm>
                            <#if vm.supervisorProjectStageId==vo.id>
                                <li lay-url="${vm.url}" onclick='queryYw(this)'>
                                    <#if vm.finishStatus=="3">
                                        <img src="${re.contextPath}/plugin/common/images/14@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="2">
                                        <img src="${re.contextPath}/plugin/common/images/15@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="1">
                                        <img src="${re.contextPath}/plugin/common/images/16@2x.png" id="lc${vm.id}"
                                             alt="">
                                    <#elseif  vm.finishStatus=="0">
                                        <img src="${re.contextPath}/plugin/common/images/17@2x.png" id="lc${vm.id}"
                                             alt="">
                                    </#if>
                                    <span style="padding-left: 7px" class="spanLc" value="${vm.id}"
                                          lay-jd="${vo.id}">${vm.milepostName}</span>
                                </li>
                            </#if>
                        </#list>
                    </ul>
                </#list>
            </div>
        </div>
        <span class="DetailsRt fr" style="font-size: 14px">备注：各阶段里程碑均支持图片上传，图片格式为：jpg、png，最大不超过5M; 文档格式为：doc、docx、xls、xlsx、ppt、pptx、pdf，最大不超过500M。</span>
        <!--右侧导航栏-->
        <div class="DetailsRt fr" id="divRight">
        </div>
        <input type="hidden" id="isyz" value="${isyz}">
        <input type="hidden" id="cfsq" value="${cfsq}">
        <input type="hidden" id="jfsq" value="${jfsq}">
        <input type="hidden" id="jflq" value="${jflq}">
        <input type="hidden" id="jlsp" value="${jlsp}">
        <input type="hidden" id="jlsh" value="${jlsh}">
        <input type="hidden" id="fview" value="${fview}">
        <input type="hidden" id="fexport" value="${fexport}">
        <input type="hidden" id="fupseal" value="${fupseal}">
        <input type="hidden" id="fsign" value="${fsign}">
        <input type="hidden" id="fupimg" value="${fupimg}">
        <input type="hidden" id="flistdel" value="${flistdel}">
         <input type="hidden" id="zjl" value="${zjl}">



    </div>
</div>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/system/supervisor/projectManager.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/common/js/jquery.common.js"></script>
<script>

    $(function(){
        //如果项目进度过小,调整样式:
        setTimeout(function(){
            formatProgress();
        },1000);

    })

    //进度值太小时美化进度条
    function formatProgress(){
        var percent = $('#proprogress');
        if(percent){
            var perOld = percent.attr('lay-percent');
            var per= perOld.replace("%","");
            if(parseFloat(per)<5  && parseFloat(per)>0){
                percent.css("width","5%");
            }
        }
    }

    /*
    *   点击里程碑 加载业务类型
    * */
    function queryYw(object) {
        var that = $(object);
        if (that.is('li')) {
            var url = that.attr("lay-url");
            var spmid = that.find('span').attr("value");
            var stageid = that.find('span').attr("lay-jd");// 阶段id

            that.parent().parent().find('li').removeClass('selected');
            that.addClass('selected')
            //加个标记，让跳转到锚点
            localStorage.setItem("pageMove","1");
            $('#divRight').load("" + url + "?id=${project.id}&spmid=" + spmid + "&stageid=" + stageid + "", function () {
                //其他操作，可对载入的 handle.html 中元素进行操作
                removeModify();
            });
        }
    }

    function removeModify() {
        var _model = getQueryString('type');
        if (!(_model == 'm')) {
            $('.downModuleBtn').hide();
            $('.btn_dzsign').hide();
            $('.btn_gz').hide();
            $('.btn_jlnbsp').hide();
            $('.btn_jlnbsh').hide();
            $('.btn_jfsq').hide();
            $('.btn_cfsq').hide();
            $('.btn_jflq').hide();
            $('.sc_image').hide();
            $('.qr_uplaod').hide();
            $('.pl_delete').hide();
            $('.upImage').hide();
            $('.btn_hzd').hide();
            $('.btn_kxjc').hide();
            $('.btn_jdjc').hide();
            $('.upfj').hide();
            $('.upseal').hide();
        }
    }

    removeModify();
    setTimeout("goFirst()", 1000);

    function goFirst() {
        $(".DetailsLfBOx li:eq(0)").click();
    }
     function exportall() {
            var   id="${project.id}";
            var   projectName="${project.projectName}";
            parent.layer.confirm('确定要导出所有的文档？', function (index) {
                parent.layer.close(index);
                window.location.href = "/supervisor/projectManager/export?id=" + id + '&name=' + projectName;
            });
      }
</script>
</body>

</html>
